package com.bailan.foreat.mapper;

import com.bailan.foreat.entity.Protype;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ste
 * @since 2023-02-21 07:50:43
 */
@Mapper
public interface ProtypeMapper extends BaseMapper<Protype> {

    @Select("select type_id  from t_protype where product_id = #{id}")
    List<Integer> getAllTypeIds(Integer id);


    @Select("select tpt.type_name  from t_product_type tpt inner join t_protype tp on tpt.id=tp.type_id  where tp.product_id = #{id}")
    List<String> getAllTypeNames(Integer id);

}
